import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import path from 'path';
// https://vitejs.dev/config
export default defineConfig({
  plugins: [vue()],
  resolve: {
  	alias: {
  		'@': path.resolve(__dirname, './src/renderer'),
  	},
  },
  server: {
    cors: true,
    proxy: {
          '/api': {
  			target:'http://127.0.0.1:8080',// 配置代理，换成你的后端服务器接口地址
            changeOrigin: true,
            rewrite: (path) => path.replace(/^\/api/, '') // 根据需要调整重写规则
          },
        }
  },
})